import 'dart:convert';

class User {
  String? id;
  dynamic creator;
  int? createDate;
  String? userId;
  String? username;
  String? password;
  String? avatar;
  int? gender;
  String? phone;
  String? email;
  String? description;
  dynamic status;
  String? birthday;
  String? address;
  String? cover;
  String? trendCount;
  String? followCount;
  String? fanCount;
  dynamic updater;
  int? updateDate;

  User({
    this.id,
    this.creator,
    this.createDate,
    this.userId,
    this.username,
    this.password,
    this.avatar,
    this.gender,
    this.phone,
    this.email,
    this.description,
    this.status,
    this.birthday,
    this.address,
    this.cover,
    this.trendCount,
    this.followCount,
    this.fanCount,
    this.updater,
    this.updateDate,
  });

  factory User.fromJson(Map<String, dynamic> json) {
    return User(
      id: json['id'],
      creator: json['creator'],
      createDate: json['createDate'],
      userId: json['userId'],
      username: json['username'],
      password: json['password'],
      avatar: json['avatar'],
      gender: json['gender'],
      phone: json['phone'],
      email: json['email'],
      description: json['description'],
      status: json['status'],
      birthday: json['birthday'],
      address: json['address'],
      cover: json['cover'],
      trendCount: json['trendCount'],
      followCount: json['followCount'],
      fanCount: json['fanCount'],
      updater: json['updater'],
      updateDate: json['updateDate'],
    );
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['creator'] = this.creator;
    data['createDate'] = this.createDate;
    data['userId'] = this.userId;
    data['username'] = this.username;
    data['password'] = this.password;
    data['avatar'] = this.avatar;
    data['gender'] = this.gender;
    data['phone'] = this.phone;
    data['email'] = this.email;
    data['description'] = this.description;
    data['status'] = this.status;
    data['birthday'] = this.birthday;
    data['address'] = this.address;
    data['cover'] = this.cover;
    data['trendCount'] = this.trendCount;
    data['followCount'] = this.followCount;
    data['fanCount'] = this.fanCount;
    data['updater'] = this.updater;
    data['updateDate'] = this.updateDate;
    return data;
  }
}
